<template>
	<view>
		<!-- <view class="page"> -->
		<view class="top" :style="`padding-top:`+$store.state.StatusBar.statusBar + `px`">
			<view class="top-icon"   @click="back">
				<u-icon name="arrow-left" size="42rpx" color='#fff'></u-icon>
			</view>
			<view class="top-title c-fff" >{{title}}</view>
		</view>
			<view class="body" :style="`margin-top:`+$store.state.StatusBar.statusBar + `px`">
				<view class="diamond" style="position: relative; overflow: hidden; border-radius: 70rpx;">
					<view class="bottom" @click="openDetail()" style="float:right; position: relative; right:-20rpx; background-color: #fff; border-radius: 30rpx; width:120rpx; height:80rpx; transform: translateY(-20rpx);  text-align: left;">
					<view style="font-size:24rpx; color:#000; margin-left:20rpx;  margin-top:30rpx;" @click="to('/pages/m-pages/m-diamondLog/index')">明细</view>
					</view>
					<image style="width:200rpx; height:150rpx; position:absolute; right:120rpx; top:80rpx;"   src="./img/ic_wallet_diamond_big.png"></image>
					<view style="font-size:40rpx; color:#fff; margin-top:80rpx; margin-left:10rpx;">钻石余额(个)</view>
					<view style="font-size:30rpx; color:#fff; margin-top:20rpx;  margin-left:10rpx;">{{info.zuanshi}}</view>
					<view class="button" style="position:absolute; right:160rpx; transform: translateY(60rpx);" @click="to('/pages/m-pages/m-diamond/index')">去充值</view>
				</view>
				<view class="mt-40"></view>
		<!-- 		<view class="px-24">
					<view class="gold">
						<image style="width:100rpx; height:100rpx;" class="img" mode="aspectFill" src="./img/ic_wallet_gold.png"></image>
						<view class="c-fff" >我的金币</view>	
						<view style="margin-top:20rpx;" class="c-fff">{{info.jinbi}}</view>
						<view class="button" style="margin-top:20rpx;" @click="to('/pages/m-pages/m-exchange/index')">兑换</view>
					</view>
					<view class="charm">
						<image style="width:100rpx; height:100rpx;" class="img" mode="aspectFill" src="./img/ic_wallet_charm.png"></image>
						<view class="c-fff" >我的魅力值</view>	
						<view style="margin-top:20rpx;" class="c-fff">{{info.meili}}</view>
						<view class="button" style="margin-top:20rpx;" @click="to('/pages/m-pages/m-meili/index')">去查看</view>
					</view>
				</view> -->
				
			</view>
		</view>
	</view>
</template>

<script>
	import {to} from '@/utils/index.js';
	export default {
		data() {
			return {
				title: '我的钱包',
				info: {}
			}
		},
		onLoad(option) {
			
		},
		onShow(option){
			this.getInfo();
		},
		methods: {
			to,
			back(){
				to()
			},
			async getInfo(){
				let res = await this.$c.post("/app/wallet/list")
				if(res.code == 1002){
					uni.navigateTo({
					  url: '/im/login/login'
					});
				}
				this.info = res.data
				console.log(this.info)
			}
		}
	}
</script>

<style scoped lang="scss">
	.page {
		width: 90vw;
		padding:40rpx;
		height: 100vh;
		background: linear-gradient(#e3ecfb, #fdedf0, #fff, #fff);
	}
	.diamond{
		// background-image: url("./img/ic_wallet_diamond_bg.png");
		// background-size: 110%; 
		background: linear-gradient(#bebef5, #ad94ec, #a17bec , #7e68ec);
		// background-position: center center; 
		width:90%; 
		height:320rpx;
		border-radius: 40rpx;
		padding:10rpx;
		color:#fff;
		margin: 0 auto;
		// margin-bottom: 40rpx;
	}
	.gold{
		text-align:center;
		float:left;
		width: 35vw; 
		height:300rpx;
		background: rgba(255, 255, 255, 0.1);
		// background:rgba(255 255, 255, 0.1);
		// background-image: url("./img/ic_wallet_gold_bg.png");
		background-size: 100%;
		background-position: center center;
		border-radius: 40rpx;
		padding:30rpx;
	}
	.charm{
		text-align:center;
		float:right;
		width: 35vw; height:300rpx;
		background: rgba(255, 255, 255, 0.1);
		// background-image: url("./img/ic_wallet_charm_bg.png");
		background-size: 100%;
		background-position: center center;
		border-radius: 40rpx;
		padding:30rpx;
	}
	.top {
		position: fixed;
		top: 0rpx;
		width: 100%;
		// background-color: #e3ecfb;
		z-index: 999;
		text-align: center;
		vertical-align: middle;
		padding:10rpx;
	}
	.top-icon {
		position: absolute;
		left: 30rpx;
		z-index: 99;
		width: 30rpx;
		height: 30rpx;
	}
	.top-title {
		line-height: 50rpx;
		display: block;
		height:50rpx;
		z-index: 99;
	}

	.body{
		padding-top:60rpx;
	}
	.nav {
		box-sizing: border-box;
		padding: 0 30rpx;
		width: 100%;
		height: 100rpx;

		.nav-icon {
			width: 40rpx;
			height: 40rpx;
		}

		.nav-list {
			height: 100%;

			.nav-list-item {
				width: 150rpx;
				height: 100%;

				.nav-list-item-title {
					margin-bottom: 10rpx;
					transition: all .3s;
				}

				.nav-str {
					opacity: 0;
					width: 50rpx;
					height: 14rpx;
					border-radius: 7rpx;
					transition: all .3s;
				}
			}

			.nav_list_item {
				font-size: 34rpx;

				.nav-list-item-title {
					transition: all .3s;
					color: #e6166a;
				}

				.nav-str {
					opacity: 1;
					background-color: #e6166a;
				}
			}

		}
	}

	.page-current {
		position: relative;
		width: 100%;
		height: 0;

		.scroll-v {
			position: relative;
			box-sizing: border-box;
			width: 100%;
			height: 0;
		}
	}

	.button{
		// background-color: #000;
		background: linear-gradient(180deg, #FDB175 5%, #F49C66 100%);
		color:#feffab;
		display: inline-block;
		padding:15rpx 30rpx;
		border-radius: 30rpx;
		font-size:24rpx;
	}

	.detail{
		padding:20rpx;
	}
	.item {
		width: 100vw ;
		height: 430rpx;
		.time{
			position: absolute;
			left: 50%;
			margin-bottom: 400rpx;
			transform: translateX(-50%);
			font-size:22rpx;
			color: #949494;
		}
		.item-box{
			margin-left:10rpx;
			margin-right:10rpx;		
			width: 100vw ;
			border-radius: 20rpx;
			background-color: #fff;
			padding:20rpx;
		}
		.item-img {
			width: calc(100%-40rpx);
			margin-top:20rpx;
			height: 180rpx;
			background-color: #f1f1f1;
		}
		.title{
			margin-top:20rpx;
			font-size: 28rpx;
		}
		.bottom{
			margin-top:20rpx;
			font-size: 24rpx;
			padding-top:20rpx;
			border-top:1px solid #bdbdbd;
		}

		.item-infr {
			.item-infr-top {}

			.item-infr-top-img {
				width: 40rpx;
				height: 40rpx;
				overflow: hidden;
				border-radius: 50%;
				margin-left: 20rpx;
			}
		}

		.item-button {
			box-sizing: border-box;
			padding: 0 20rpx;
			height: 50rpx;
			text-align: center;
			line-height: 50rpx;
			border-radius: 25rpx;
			background-color: #e8e1e8;
		}
		.item-button_{
			box-sizing: border-box;
			padding: 0 20rpx;
			height: 50rpx;
			text-align: center;
			line-height: 50rpx;
			border-radius: 25rpx;
			background-image: linear-gradient(to right,rgba(230, 22, 106, 0.3),#e6166a);
			.item-button_icon{
				width: 30rpx;
				height: 30rpx;
				margin-right: 6rpx;
			}
		}
		
	}
</style>